package com.winit.schedule.demo;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;

public class Startup {

    public static void main(String[] args) {
        Server server = new Server(8081);

        WebAppContext context = new WebAppContext();
        context.setContextPath("/uschedule");
        context.setDescriptor("src/webapp/WEB-INF/web.xml");
        context.setResourceBase("src/webapp");
        context.setParentLoaderPriority(true);
        server.setHandler(context);

        try {
            server.start();
            server.wait(Integer.MAX_VALUE);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
